#!/bin/bash

for filename in $1 
	do
		#Enclose with "" will solve the space issue.
		echo " s/"$2"/"$3"/g" > rule.sed
		sed -f rule.sed $filename > $filename'.tmp' && rm -f $filename && mv $filename'.tmp' $filename 
		if [ $? = 0 ]
		then
			echo "Done!!!!!!!!!";
		else
			echo "Failed!";
		fi
	
	done

